{% extends "default/base.html" %}
{% load i18n %}
{% load sell_tags %}

{% block content %}
<ul class="breadcrumb">
 <li><a href="{% url market_home %}">{% trans "Home" %}</a><span class="divider"> / </span></li>
 <li><a href="{% url market_auctions %}">{% trans "Auctions" %}</a></li>
</ul>

{% block filter_content %}
{% endblock %}

{% block main_content %}
<div class="span12 offset2">
	<div class="content">
	<h2>{{ total }} Auctions Found</h2>
	<h3>Listing {{ lots.object_list.count }} lot{{ lots.object_list.count|pluralize }}</h3>
	
	{% if lots.object_list.count %}
	{% for lot in lots.object_list %}
		<div id="{{ lot.product_ptr_id }}" class="modal hide fade">
		 <div class="modal-header">
		 <a href="#" class="close">&times;</a>
		 <h3>{{ lot.title|title|safe }}</h3>
		</div>
	       	 <div class="modal-body">
		 <p><img src="{{ lot.image.image.url_100x100 }}" alt="{{ lot.description|striptags }}"> </p>
		 <p>{{ lot.description }}</p>
		</div>
	       <div class="modal-footer">
		<a href="{% url market_buy_product_redirect lot.product_ptr_id %}" target="_blank" class="btn primary">Go To Dealer's Product Page</a> 
		</div>
		</div>	


		<div class="item_box">
			<a data-controls-modal="{{ lot.product_ptr_id }}" data-backdrop="true" data-keyboard="true">
			{% if lot.image %}
			<img class="item" src="{{ lot.image.image.url_100x100 }}" title="{{ lot.description|striptags }}" alt="{{ lot.description|striptags}}"/>
			{% else %}
			<img class="item" src="{{ STATIC_URL }}img/no-photo-medium.jpg" title="{{ lot.description|striptags }}" alt="{{ lot.description|striptags}}"/>
			{% endif %}
			<div class="title">{{ lot.title|truncatewords:5 }}</div>
			<div class="dealer">{{ lot.category.name }}</div>
			<div class="price">{{ lot.price|money_format:lot.shop }}</div>
			</a>
		</div>
	{% endfor %}
	
	<div class="pagination">
	{% with lots as objects %}
		{% include 'paginator.html'%}
	{% endwith %}
	</div>
			
	{% else %}
	{% trans "No lots found" %}
	{% endif %}
	</div>
	
</div>
{% endblock %}

{% endblock %}
